// 1446. 连续字符

#include <string>
#include <algorithm>
using namespace std;

class Solution
{
public:
    int maxPower(string& s)
    {
        int left = 0, right = 0, pow = 0;
        for(left = 0, right = 1; right < s.size(); right++)
        {
            if(s[right] != s[right - 1])
            {
                pow = max(pow, right - left);           
                left = right;
            }
        }
        pow = max(pow, right - left);
        return pow;
    }
};